﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>
<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  
  <div class="container-fluid ihg-container">
  
    <div class="ihg-content-layout" style="margin-top: 0">
      <div class="col-sm-7">
        <div class="panel panel-default ihg-panel">
          <div class="panel-heading">
            <span class="panel-titles text-info" style="font-size: 13px;font-weight: bold;">
              <i class="glyphicon glyphicon-list" style="top: 2px;"></i>&nbsp;&nbsp;
              MY ACTIVE SESSIONS
            </span>
          </div>
          
          <div class="panel-body" style="padding: 0px;">
            <table class="table ihg-table tab-pane" style="margin: 0px;">
              <thead>
                <tr>
                  <th>NAME</th>
                  <th>PARTICIPANTS</th>
                  <th>DATE</th>
                  <th>Administrator</th>
                  <th>PHASE</th>
                </tr>
              </thead>
              
              <tbody>
                <c:forEach var="session" items="${sessions}">
                  <tr>
                    <td><a href="${ctx.host}/sessions/${session.id}/preparation-home">${session.name}</a></td>
                    <td>
                      <p>Assessor:&nbsp;${session.assessorCount}</p>
                      <p>Delegate:&nbsp;${session.delegateCount}</p>
                    </td>
                    <td><fmt:formatDate value="${session.startDate}" pattern="yyyy-MM-dd"/>&nbsp;~&nbsp;<fmt:formatDate value="${session.endDate}" pattern="yyyy-MM-dd"/></td>
                    <td>
                      <p style="text-align:left;">Administrator: ${session.sessionHost.name}</p>
                      <p style="text-align:left;">Accessor Owner: ${session.assessorOwner.name}</p>
                      <p style="text-align:left;">Delegate Owner: ${session.delegateOwner.name}</p>
                    </td>
                    <td>
                    
                      <c:choose>
                        <c:when test="${session.sessionPhase.before}">
                          <a href="${ctx.host}/sessions/${session.id}/preparation-home">
                            <label class="label label-${session.sessionPhase.css}">${session.sessionPhase.display}</label>
                          </a>
                        </c:when>
                        
                        <c:when test="${session.sessionPhase.during}">
                          <a href="${ctx.host}/sessions/${session.id}/day-one-summary">
                            <label class="label label-${session.sessionPhase.css}">${session.sessionPhase.display}</label>
                          </a>
                        </c:when>
                        
                        <c:when test="${session.sessionPhase.after}">
                          <a href="${ctx.host}/sessions/${session.id}/">
                            <label class="label label-${session.sessionPhase.css}">${session.sessionPhase.display}</label>
                          </a>
                        </c:when>
                      </c:choose>
                    </td>
                  </tr>
                </c:forEach>
              </tbody>
            </table>
            
          </div>
        </div>
        <a href="${ctx.host}/active-sessions" style="color: #155CB2;">All Active Sessions&nbsp;&nbsp;>></a>
      </div>
    
      <div class="col-sm-5">
        <div class="panel panel-default ihg-panel">
          <div class="panel-heading">
            <span class="panel-titles text-success" style="font-size: 13px; font-weight: bold;"><i class="glyphicon glyphicon-th-large" style="top: 2px;"></i>&nbsp;&nbsp;SHORTCUTS</span>
          </div>
          
          <div class="panel-body home-imgicons">
            <div class="row">
              <div class="col-xs-12">
                <div class="gird-warp">
                  <div class="gird-title">
                   Account Setting
                  </div>
                  <div class="gird-list row">
                    <div class="col-xs-3">
                      <a href="${ctx.host}/assessors" class="shortcut-link label-success" style="color: #fff;">
                        <span class="iconfont icon-person_04" aria-hidden="true"></span>
                        <br>
                        Assessor<br>Setting
                      </a>
                    </div>
                    <div class="col-xs-3">
                      <a href="${ctx.host}/delegates" class="shortcut-link label-primary" style="color: #fff;">
                        <span class="iconfont icon-wode" aria-hidden="true"></span>
                        <br>
                        Delegate<br>Setting
                      </a>
                    </div>
                    <div class="col-xs-3">
                      <a href="${ctx.host}/administrators" class="shortcut-link label-warning" style="color: #fff;">
                        <span class="iconfont icon-guanliyuan" aria-hidden="true"></span>
                        <br>
                        Administrator<br>Setting
                      </a>
                    </div>
                  </div>
                </div>
              </div>
              <div class="col-xs-12">
                <div class="gird-warp">
                  <div class="gird-title">
                    Session Setting
                  </div>
                  <div class="gird-list row">
                    <div class="col-xs-6">
                      <a href="${ctx.host}/session-settings/create" class="shortcut-link label-primary" style="color: #fff;">
                        <span class="iconfont icon-tianjia1" aria-hidden="true"></span>
                        <br>
                        Add<br>Session
                      </a>
                    </div>
                    <div class="col-xs-3">
                      <a href="${ctx.host}/session-settings" class="shortcut-link label-primary" style=" color: #fff;">
                        <span class="iconfont icon-tianjia01" aria-hidden="true"></span>
                        <br>
                        Session<br>Setting List
                      </a>
                    </div>
                  </div>
                </div>
              </div>
              <div class="col-xs-12">
                <div class="gird-warp">
                  <div class="gird-title">
                    Sessions
                  </div>
                  <div class="gird-list row">
                    <div class="col-xs-3">
                      <a href="${ctx.host}/active-sessions" class="shortcut-link label-primary" style="color: #fff;">
                        <span class="iconfont icon-shijian" aria-hidden="true"></span>
                        <br>
                        Active<br>Session
                      </a>
                    </div>
                    <div class="col-xs-3">
                      <a href="${ctx.host}/history-sessions" class="shortcut-link label-primary" style="color: #fff;">
                        <span class="iconfont icon-lishijilu" aria-hidden="true"></span>
                        <br>
                        History<br>Session
                      </a>
                    </div>
                    <div class="col-xs-3">
                      <a href="${ctx.host}/session-reports" class="shortcut-link label-danger" style="color: #fff;">
                        <span class="iconfont icon-baogao" aria-hidden="true"></span>
                        <br>
                        Report<br>search
                      </a>
                    </div>
                    <div class="col-xs-3">
                      <a href="${ctx.host}/admin-coaching-progresses" class="shortcut-link label-primary" style="color: #fff;">
                        <span class="iconfont icon-baogao" aria-hidden="true"></span>
                        <br>
                        Coaching Progress<br>Tracking
                      </a>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>

</body>
</html>